/**
 * 方法切换入参格式
 * **/
function methodSwitch(obj) {
    var val = obj.value;
    if("GET"==val){
        $("#urlParam").show();
        $("#addParam").show();
        $("#urlBody").hide();
    }else {
        $("#urlParam").hide();
        $("#addParam").hide();
        $("#urlBody").show();
    }
}
function invoke() {
    var requestUrl = "/httpTool/invoke";
    var interfaceName = $("#interfaceName").val();
    var interfaceMethod = $("#interfaceMethod").val();
    var encoding = $("#encoding").val();
    var timeout = $("#timeout").val();
    var header =headerParam.getDataMapJson();
    var param =urlParam.getDataMapJson();
    var body=$("#body").val();
    var interfaceType="http";
    $.ajax({
        url: requestUrl,
        method: "post",
        data: {
            interfaceName: interfaceName,
            interfaceMethod: interfaceMethod,
            param: param,
            encoding: encoding,
            timeout: timeout,
            header:header,
            body:body,
            interfaceType:interfaceType
        },
        beforeSend: function () {

        }, success: function (result) {
            $("#result").val(result);
        }
    })
}